package com.etrans.web.gps.business.report.domain;

import java.util.Date;

import com.alibaba.fastjson.JSONObject;

/**
 * @author RenweiWu
 * @date 2017年9月3日
 * @ClassName:  EnterpriseSwap  
 * @param:   
 */
public class EnterpriseSwap implements Comparable<EnterpriseSwap>{
	private	String  _id; 							//"<yyMM:业户ID>"	
	private int enterprise_id;						// 业户id
	private	int	 check_count;						// 查岗次数
	private	int	 alarm_count;						// 报警总数
	private	double	data_correct_rate;				// 数据合格率(即1-数据错误率 乘以100)
	private	int	 over_load_processed;				// 超员报警处理总数
    private	double	track_complete_rate;			// 轨迹完整率(1分钟内至少有一条轨迹）
    private	int	 notrack_vehicle_count;				// 无轨迹车辆数（超过10天不上传轨迹的车辆数）
    private	int	 overspeed_processed; 				// 超速报警处理总数
    private	int	 tired_count; 						// 疲劳驾驶报警
    private	int	 overspeed_count;					// 超速报警总数
    private	int	 reply_correct_count;				// 回复正确次数
    private	double	reply_rate;						// 回复率（即在岗率）
    private	double	vehicle_access_rate;						//入网率
    private	double	vehicle_online_rate;						// 上线率
    private	int	 vehicle_online_count;				// 上线数
    private	int	 tired_duration; 					// 疲劳驾驶时长,单位为 秒
    private	Date analyse_date;					// 分析日期
    private	int	 prohibit_driving_count; 			// 2-5点禁行报警
    private	int	 roadoffset_count;					// 路线偏离报警总数
    private	int	 exception_track_count;				// 异常轨迹总条数
    private	int	 tired_processed; 					// 疲劳驾驶报警处理总数
    private	int	 nightly_3rd_count; 				// 夜间三级路面报警
    private	int	 location_exception_count;			// 位置异常条数
    private	int	 overspeed_100_count;				// 速度超过100KM/H的条数
    private	int	 nightly_3rd_processed; 			// 夜间三级路面报警处理总数
    private	int	 reply_count;						// 回复次数
    private	int	 speed_exception_count;				// 速度条数
    private	int	 track_normal;						// 正常轨迹数
    private	int	 vehicle_count;						// 车辆总数
    private	int	 roadoffset_processed;				// 路线偏离报警处理总数
    private	int	 alarm_processed;					// 报警处理总数
    private	int	 alarm_vehicle_count;				// 报警车辆总数
    private	int	 over_load_count;					// 超员报警
    private	double	data_fault_rate;				// 数据错误率
    private	int	 prohibit_driving__processed; 		// 2-5点禁行报警处理总数
    private	int	 speed_160_count;					// 速度超过160KM/H的条数
    private	String	 enterprise_name; 				// 业户名称
    private	int	 gpstime_exception_count;			// 时间异常条数
    private	int	 head_exception_count;				// 方向条数	
    private	int	 vehicle_access_count;				// 入网车辆数
	private int count;								//对象个数
	private double score;							//得分
	private int ranking;							//排名
	private int exception_vehicle_count;			//异常车辆数
	private double vehicle_alarm_rate;				//车辆报警率
	private double avg_vehicle_speed_counts;		//平均车辆超速次数
	private double avg_vehicle_tired_duration;		//平均车辆疲劳驾驶时间（分钟）
	private int adas_alarm_count;
	private double position_exception_rate;
	private JSONObject trade_obj;
	public String get_id() {
		return _id;
	}
	public void set_id(String _id) {
		this._id = _id;
	}
	public int getEnterprise_id() {
		return enterprise_id;
	}
	public void setEnterprise_id(int enterprise_id) {
		this.enterprise_id = enterprise_id;
	}
	public int getCheck_count() {
		return check_count;
	}
	public void setCheck_count(int check_count) {
		this.check_count = check_count;
	}
	public int getAlarm_count() {
		return alarm_count;
	}
	public void setAlarm_count(int alarm_count) {
		this.alarm_count = alarm_count;
	}
	public double getData_correct_rate() {
		return data_correct_rate;
	}
	public void setData_correct_rate(double data_correct_rate) {
		this.data_correct_rate = data_correct_rate;
	}
	public int getOver_load_processed() {
		return over_load_processed;
	}
	public void setOver_load_processed(int over_load_processed) {
		this.over_load_processed = over_load_processed;
	}
	public double getTrack_complete_rate() {
		return track_complete_rate;
	}
	public void setTrack_complete_rate(double track_complete_rate) {
		this.track_complete_rate = track_complete_rate;
	}
	public int getNotrack_vehicle_count() {
		return notrack_vehicle_count;
	}
	public void setNotrack_vehicle_count(int notrack_vehicle_count) {
		this.notrack_vehicle_count = notrack_vehicle_count;
	}
	public int getOverspeed_processed() {
		return overspeed_processed;
	}
	public void setOverspeed_processed(int overspeed_processed) {
		this.overspeed_processed = overspeed_processed;
	}
	public int getTired_count() {
		return tired_count;
	}
	public void setTired_count(int tired_count) {
		this.tired_count = tired_count;
	}
	public int getOverspeed_count() {
		return overspeed_count;
	}
	public void setOverspeed_count(int overspeed_count) {
		this.overspeed_count = overspeed_count;
	}
	public int getReply_correct_count() {
		return reply_correct_count;
	}
	public void setReply_correct_count(int reply_correct_count) {
		this.reply_correct_count = reply_correct_count;
	}
	public double getReply_rate() {
		return reply_rate;
	}
	public void setReply_rate(double reply_rate) {
		this.reply_rate = reply_rate;
	}
	public int getVehicle_online_count() {
		return vehicle_online_count;
	}
	public void setVehicle_online_count(int vehicle_online_count) {
		this.vehicle_online_count = vehicle_online_count;
	}
	public int getTired_duration() {
		return tired_duration;
	}
	public void setTired_duration(int tired_duration) {
		this.tired_duration = tired_duration;
	}
	public Date getAnalyse_date() {
		return analyse_date;
	}
	public void setAnalyse_date(Date analyse_date) {
		this.analyse_date = analyse_date;
	}
	public int getProhibit_driving_count() {
		return prohibit_driving_count;
	}
	public void setProhibit_driving_count(int prohibit_driving_count) {
		this.prohibit_driving_count = prohibit_driving_count;
	}
	public int getRoadoffset_count() {
		return roadoffset_count;
	}
	public void setRoadoffset_count(int roadoffset_count) {
		this.roadoffset_count = roadoffset_count;
	}
	public int getException_track_count() {
		return exception_track_count;
	}
	public void setException_track_count(int exception_track_count) {
		this.exception_track_count = exception_track_count;
	}
	public int getTired_processed() {
		return tired_processed;
	}
	public void setTired_processed(int tired_processed) {
		this.tired_processed = tired_processed;
	}
	public int getNightly_3rd_count() {
		return nightly_3rd_count;
	}
	public void setNightly_3rd_count(int nightly_3rd_count) {
		this.nightly_3rd_count = nightly_3rd_count;
	}
	public int getLocation_exception_count() {
		return location_exception_count;
	}
	public void setLocation_exception_count(int location_exception_count) {
		this.location_exception_count = location_exception_count;
	}
	public int getOverspeed_100_count() {
		return overspeed_100_count;
	}
	public void setOverspeed_100_count(int overspeed_100_count) {
		this.overspeed_100_count = overspeed_100_count;
	}
	public int getNightly_3rd_processed() {
		return nightly_3rd_processed;
	}
	public void setNightly_3rd_processed(int nightly_3rd_processed) {
		this.nightly_3rd_processed = nightly_3rd_processed;
	}
	public int getReply_count() {
		return reply_count;
	}
	public void setReply_count(int reply_count) {
		this.reply_count = reply_count;
	}
	public int getSpeed_exception_count() {
		return speed_exception_count;
	}
	public void setSpeed_exception_count(int speed_exception_count) {
		this.speed_exception_count = speed_exception_count;
	}
	public int getTrack_normal() {
		return track_normal;
	}
	public void setTrack_normal(int track_normal) {
		this.track_normal = track_normal;
	}
	public int getVehicle_count() {
		return vehicle_count;
	}
	public void setVehicle_count(int vehicle_count) {
		this.vehicle_count = vehicle_count;
	}
	public int getRoadoffset_processed() {
		return roadoffset_processed;
	}
	public void setRoadoffset_processed(int roadoffset_processed) {
		this.roadoffset_processed = roadoffset_processed;
	}
	public int getAlarm_processed() {
		return alarm_processed;
	}
	public void setAlarm_processed(int alarm_processed) {
		this.alarm_processed = alarm_processed;
	}
	public int getAlarm_vehicle_count() {
		return alarm_vehicle_count;
	}
	public void setAlarm_vehicle_count(int alarm_vehicle_count) {
		this.alarm_vehicle_count = alarm_vehicle_count;
	}
	public int getOver_load_count() {
		return over_load_count;
	}
	public void setOver_load_count(int over_load_count) {
		this.over_load_count = over_load_count;
	}
	public double getData_fault_rate() {
		return data_fault_rate;
	}
	public void setData_fault_rate(double data_fault_rate) {
		this.data_fault_rate = data_fault_rate;
	}
	public int getProhibit_driving__processed() {
		return prohibit_driving__processed;
	}
	public void setProhibit_driving__processed(int prohibit_driving__processed) {
		this.prohibit_driving__processed = prohibit_driving__processed;
	}
	public int getSpeed_160_count() {
		return speed_160_count;
	}
	public void setSpeed_160_count(int speed_160_count) {
		this.speed_160_count = speed_160_count;
	}
	public String getEnterprise_name() {
		return enterprise_name;
	}
	public void setEnterprise_name(String enterprise_name) {
		this.enterprise_name = enterprise_name;
	}
	public int getGpstime_exception_count() {
		return gpstime_exception_count;
	}
	public void setGpstime_exception_count(int gpstime_exception_count) {
		this.gpstime_exception_count = gpstime_exception_count;
	}
	public int getHead_exception_count() {
		return head_exception_count;
	}
	public void setHead_exception_count(int head_exception_count) {
		this.head_exception_count = head_exception_count;
	}
	public int getVehicle_access_count() {
		return vehicle_access_count;
	}
	public void setVehicle_access_count(int vehicle_access_count) {
		this.vehicle_access_count = vehicle_access_count;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public double getScore() {
		return score;
	}
	public void setScore(double score) {
		this.score = score;
	}
	public int getRanking() {
		return ranking;
	}
	public void setRanking(int ranking) {
		this.ranking = ranking;
	}
	public int getException_vehicle_count() {
		return exception_vehicle_count;
	}
	public void setException_vehicle_count(int exception_vehicle_count) {
		this.exception_vehicle_count = exception_vehicle_count;
	}
	@Override
	public String toString() {
		return "EnterpriseSwap [_id=" + _id + ", enterprise_id=" + enterprise_id + ", check_count=" + check_count
				+ ", alarm_count=" + alarm_count + ", data_correct_rate=" + data_correct_rate + ", over_load_processed="
				+ over_load_processed + ", track_complete_rate=" + track_complete_rate + ", notrack_vehicle_count="
				+ notrack_vehicle_count + ", overspeed_processed=" + overspeed_processed + ", tired_count="
				+ tired_count + ", overspeed_count=" + overspeed_count + ", reply_correct_count=" + reply_correct_count
				+ ", reply_rate=" + reply_rate + ", vehicle_online_count=" + vehicle_online_count + ", tired_duration="
				+ tired_duration + ", analyse_date=" + analyse_date + ", prohibit_driving_count="
				+ prohibit_driving_count + ", roadoffset_count=" + roadoffset_count + ", exception_track_count="
				+ exception_track_count + ", tired_processed=" + tired_processed + ", nightly_3rd_count="
				+ nightly_3rd_count + ", location_exception_count=" + location_exception_count
				+ ", overspeed_100_count=" + overspeed_100_count + ", nightly_3rd_processed=" + nightly_3rd_processed
				+ ", reply_count=" + reply_count + ", speed_exception_count=" + speed_exception_count
				+ ", track_normal=" + track_normal + ", vehicle_count=" + vehicle_count + ", roadoffset_processed="
				+ roadoffset_processed + ", alarm_processed=" + alarm_processed + ", alarm_vehicle_count="
				+ alarm_vehicle_count + ", over_load_count=" + over_load_count + ", data_fault_rate=" + data_fault_rate
				+ ", prohibit_driving__processed=" + prohibit_driving__processed + ", speed_160_count="
				+ speed_160_count + ", enterprise_name=" + enterprise_name + ", gpstime_exception_count="
				+ gpstime_exception_count + ", head_exception_count=" + head_exception_count + ", vehicle_access_count="
				+ vehicle_access_count + ", count=" + count + ", score=" + score + ", ranking=" + ranking
				+ ", exception_vehicle_count=" + exception_vehicle_count + "]";
	}
	public double getVehicle_alarm_rate() {
		return vehicle_alarm_rate;
	}
	public void setVehicle_alarm_rate(double vehicle_alarm_rate) {
		this.vehicle_alarm_rate = vehicle_alarm_rate;
	}
	public double getAvg_vehicle_tired_duration() {
		return avg_vehicle_tired_duration;
	}
	public void setAvg_vehicle_tired_duration(double avg_vehicle_tired_duration) {
		this.avg_vehicle_tired_duration = avg_vehicle_tired_duration;
	}
	public double getAvg_vehicle_speed_counts() {
		return avg_vehicle_speed_counts;
	}
	public void setAvg_vehicle_speed_counts(double avg_vehicle_speed_counts) {
		this.avg_vehicle_speed_counts = avg_vehicle_speed_counts;
	}
	public JSONObject getTrade_obj() {
		return trade_obj;
	}
	public void setTrade_obj(JSONObject trade_obj) {
		this.trade_obj = trade_obj;
	}
	public double getVehicle_access_rate() {
		return vehicle_access_rate;
	}
	public void setVehicle_access_rate(double vehicle_access_rate) {
		this.vehicle_access_rate = vehicle_access_rate;
	}
	public double getVehicle_online_rate() {
		return vehicle_online_rate;
	}
	public void setVehicle_online_rate(double vehicle_online_rate) {
		this.vehicle_online_rate = vehicle_online_rate;
	}
	public int getAdas_alarm_count() {
		return adas_alarm_count;
	}
	public void setAdas_alarm_count(int adas_alarm_count) {
		this.adas_alarm_count = adas_alarm_count;
	}
	public double getPosition_exception_rate() {
		return position_exception_rate;
	}
	public void setPosition_exception_rate(double position_exception_rate) {
		this.position_exception_rate = position_exception_rate;
	}
	@Override
	public int compareTo(EnterpriseSwap e) {
		if (score != e.getScore()) {
			return score > e.getScore() ? -1 : 1;
		}else if (vehicle_access_rate!=e.getVehicle_access_rate()) {
			return vehicle_access_rate > e.getVehicle_access_rate() ? -1 : 1;
		}else if (vehicle_online_rate!=e.getVehicle_online_rate()) {
			return vehicle_online_rate > e.getVehicle_online_rate() ? -1 : 1;
		}else if (track_complete_rate!=e.getTrack_complete_rate()) {
			return track_complete_rate > e.getTrack_complete_rate() ? -1 : 1;
		}else if (data_correct_rate!=e.getData_correct_rate()) {
			return data_correct_rate > e.getData_correct_rate() ? -1 : 1;
		}else if (position_exception_rate!=e.getPosition_exception_rate()) {
			return position_exception_rate > e.getPosition_exception_rate() ? -1 : 1;
		}else if (reply_rate!=e.getReply_rate()) {
			return reply_rate > e.getReply_rate() ? -1 : 1;
		}else if (enterprise_id<e.getEnterprise_id()) {
			return 1;
		}else {
			return 0;
		}
	}
}